<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html lang="en">
<head>
	<script src="js/jquery-2.2.4.min.js"></script>
	<script type="text/javascript">	
	$(function(){
$("#tijiao").click(function(){
	 var pwd = $("input[name='newPassword']").val();
     var pwd1 = $("input[name='confirmNewPassword']").val();
	if(pwd !=pwd1){
	alert("密码不一致！")
	$("input[name='newPassword']").val("");
    $("input[name='confirmNewPassword']").val("");
    }else{
    	 	var obj = {
            username:$("#username").val(),
            email:$('#address').val(),
            address:$('#address').val(),
            pwd:$("input[name='newPassword']").val(),
            oldPwd:$("input[name='confirmNewPassword']").val()
          };
    }
})
});

</script>

	<style type="text/css">
form{	
	margin: 0 auto;
}
body{
	background-color: gray;
}

		input{
			outline-style: none ;
			border: 1px solid #ccc;
			border-radius: 3px;
			padding: 14px 14px;
			width: 620px;
			font-size: 24px;
			font-family: "Microsoft soft", serif;
		}
input:focus{
	border-color: #66afe9;
	outline: 0;
	-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);
	box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)
}
.basic-grey {
	margin-left:auto;
	margin-right:auto;
	max-width: 500px;
	background: #F7F7F7;
	padding: 25px 15px 25px 10px;
	font: 12px Georgia, "Times New Roman", Times, serif;
	color: #888;
	text-shadow: 1px 1px 1px #FFF;
	border:1px solid #E4E4E4;
}
.basic-grey h1 {
	font-size: 25px;
	padding: 0px 0px 10px 40px;
	display: block;
	border-bottom:1px solid #E4E4E4;
	margin: -10px -15px 30px -10px;;
	color: #888;
}
.basic-grey h1>span {
	display: block;
	font-size: 11px;
}
.basic-grey label {
	display: block;
	margin: 0px;
}
.basic-grey label>span {
	float: left;
	width: 20%;
	text-align: right;
	padding-right: 10px;
	margin-top: 10px;
	color: #888;
}
.basic-grey input[type="text"], .basic-grey input[type="email"], .basic-grey textarea, .basic-grey select,
.basic-grey input[type="password"],.basic-grey input[type="file"],.basic-grey input[type="submit"]{
	border: 1px solid #DADADA;
	color: #888;
	height: 30px;
	margin-bottom: 16px;
	margin-right: 6px;
	margin-top: 2px;
	outline: 0 none;
	padding: 3px 3px 3px 5px;
	width: 70%;
	font-size: 12px;
	line-height:15px;
	box-shadow: inset 0px 1px 4px #ECECEC;
	-moz-box-shadow: inset 0px 1px 4px #ECECEC;
	-webkit-box-shadow: inset 0px 1px 4px #ECECEC;
}
.basic-grey textarea{
	padding: 5px 3px 3px 5px;
}
.basic-grey textarea{
	height:100px;
}
.basic-grey .button {
	background: #E27575;
	border: none;
	padding: 10px 25px 10px 25px;
	color: #FFF;
	box-shadow: 1px 1px 5px #B6B6B6;
	border-radius: 3px;
	text-shadow: 1px 1px 1px #9E3F3F;
	cursor: pointer;
}
.basic-grey .button:hover {
	background: #CF7A7A
}
</style>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<form action="UpdateUserInfoServlet" method="post" enctype="multipart/form-data" class="basic-grey">
	<div id="form-id" style="text-align: center">
			<img src="upload/${userInfo.img}" style="height: 100px;width: 100px;" alt="">
		<br>
			<input type="text" name="username" placeholder="用户名" id="username" value="${userInfo.username}">
			<input type="hidden" name="password" id="password" value="${userInfo.password}">
			<input type="password" name="newPassword" placeholder="请输入新密码">
			<input type="password" name="confirmNewPassword" placeholder="请确认新密码">
			<input type="text" name="address" placeholder="地址" id="address" value="${userInfo.address}">
			<input type="text" name="email" placeholder="邮箱" id="email" value="${userInfo.email}">
			<input type="hidden" name="id" placeholder="" id="" value="${userInfo.id}">
			<input type="text" name="readOnlyImg" value="${userInfo.img}" readonly="readonly">
			<input type="file" name="img" value="" >
			<input type="hidden" name="imgName" value="${userInfo.img}"/>
			<input type="text" name="userType" readonly="readonly" value="${userInfo.userType}">
			<input type="submit" id="tijiao"  value="提交"/>
</div>
	</form>
</body>
</html>